
	dojo.require("dijit.layout.LayoutContainer");
	dojo.require("dijit.layout.ContentPane");	
	dojo.require("dijit.layout.SplitContainer");
	dojo.require("dijit.layout.TabContainer");
	dojo.require("dijit.layout.AccordionContainer");
	dojo.require("dijit.Dialog");
	dojo.require("dijit.TitlePane");
	dojo.require("dojo.parser");
	dojo.require("dojox.layout.ContentPane");
	dojo.require("holly.TitlePane");
/**		//不在使用多标签的模式	
function addTab_bak(title,url,single){
	if(single=="1"){//只允许同时打开一个Tab
		var cds=dijit.byId("mainTab").getChildren();
		for(var i=0;i<cds.length;i++)
			if(cds[i].title==title){
				dijit.byId("mainTab").selectChild(cds[i]);
				return;
			}	
	}
	var tt=document.createElement("DIV");
	var tab=new dojox.layout.ContentPane({title:title,href:url,closable:true},tt);
	dijit.byId("mainTab").addChild(tab);
	dijit.byId("mainTab").selectChild(tab);
}
function addTabFrame_bak(title,url,single){
	if(single=="1"){//只允许同时打开一个Tab
		var cds=dijit.byId("mainTab").getChildren();
		for(var i=0;i<cds.length;i++)
			if(cds[i].title==title){
				dijit.byId("mainTab").selectChild(cds[i]);
				return;
			}	
	}
	var tt=document.createElement("DIV");
	var tab=new dijit.layout.ContentPane({title:title,closable:true},tt);	
	dijit.byId("mainTab").addChild(tab);
	dijit.byId("mainTab").selectChild(tab);
	tab.setContent("<iframe width=100% height=100% frameborder=0 src='"+url+"'></iframe>");

}
*/


//定义两个临时变量，供其他模块传递参数使用
var tempStr="";
var tempNum="";


function addTabFrame(title,url){
	addTab(title,url);
}
function addTab(title,url){
	dojo.byId("mainFrm").src=url;
}

function closeOnShow(){
//关闭当前的tab
	var cds=dijit.byId("mainTab").getChildren();
	for(var i=0;i<cds.length;i++){
		if(cds[i].selected){
			dijit.byId("mainTab").closeChild(cds[i]);
			return;
		}
	}
}


function exitSys(){
        if(confirm("您确认要退出系统？"))
          parent.window.location="/main/login/loginout.jsp";
        else
          return false;
}

//显示信息
function showInfo(info){
	if(info!=null){
		dojo.byId("inforData").innerHTML=info;
		dijit.byId("showInforDia").show();
		setTimeout("hideInfo()",2000);
	}
}
function hideInfo(){
	dijit.byId("showInforDia").hide();
}

//to open a new window without status
var winNum=0;
var ObjWin=null;
var winName="openWin";
var left=(screen.availWidth-640)/2;
var top_a=(screen.availHeight-480)/2;
function openwin(URL,winName,leftMargin,topMargin,winWidth,winHeight){
	if(winName !=null && leftMargin!=null && topMargin!=null && winWidth !=null && winHeight !=null){
		ObjWin=window.open(URL,winName,"left="+leftMargin+" top="+topMargin+" width="+winWidth+", height="+winHeight+" menu=yes status=yes resizable=yes scrollbars=yes");
	}else{
		if(ObjWin!=null){
			winNum++;
			winName="openWin"+winNum;
				left+=winNum*20;
				top_a+=winNum*20;
			}
		ObjWin=window.open(URL,winName,"left="+left+" top="+top_a+" width=640  height=480 menu=yes status=yes resizable=yes scrollbars=auto");
	}
	ObjWin.opener=this;
}


